//
//  AboutUsViewController.m
//  PrivateSteward
//
//  Created by lanou3g on 16/3/25.
//  Copyright © 2016年 闫贺晨. All rights reserved.
//

#import "AboutUsViewController.h"

@interface AboutUsViewController ()

@end

@implementation AboutUsViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.navigationController.navigationBar.hidden = NO;
    self.navigationController.navigationBar.translucent = NO;
    self.navigationItem.title = @"关于我们";
     self.navigationController.navigationBar.tintColor = [UIColor grayColor];
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithTitle:@"返回" style:UIBarButtonItemStylePlain target:self action:@selector(back)];
    self.view.backgroundColor = [UIColor whiteColor];
    self.aboutusImageview = [[UIImageView alloc]initWithFrame:CGRectMake(CGRectGetMinX(self.view.frame), CGRectGetMinY(self.view.frame), self.view.frame.size.width,350)];
    self.aboutusImageview.image = [UIImage imageNamed:@"aboutus"];
    [self.view addSubview:self.aboutusImageview];
    
    
    
    
    self.describeLable = [[UILabel alloc]initWithFrame:CGRectMake(0, CGRectGetMaxY(self.aboutusImageview.frame), self.view.frame.size.width,100)];
    self.describeLable.numberOfLines = 0;
    self.describeLable.font = [UIFont systemFontOfSize:16];
    [self.view addSubview:self.describeLable];
    self.describeLable.text = @"     我们是个专业团队,谢谢您的信任,我们会将客户意见总结,改善我们的不足之处,将一个更完美的私人小助手呈现给您!";
    CGFloat tempHight = [self heightForString:self.describeLable.text];
    CGRect tempRect = self.describeLable.frame;
    tempRect.size.height = tempHight;
    self.describeLable.frame = tempRect;
  
    
}
-(void)back
{
    
    [[NSNotificationCenter defaultCenter]postNotificationName:@"didlogin" object:nil];
    [self.navigationController popViewControllerAnimated:YES];
}

-(CGFloat)heightForString:(NSString *)aString
{
    NSDictionary *dict = @{NSFontAttributeName:[UIFont systemFontOfSize:16.0]};
    CGRect rect = [aString boundingRectWithSize:CGSizeMake(self.view.frame.size.width, 2000) options:NSStringDrawingUsesLineFragmentOrigin attributes:dict context:nil];
    return rect.size.height;
}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
